package demo;

//Day03
public class Day13001 {
    public static void main(String[] args) {
        JavaTeacher javaTeacher = new JavaTeacher("张三", "男", 28);
        UITeacher uiTeacher = new UITeacher("李四", "女", 30);
        javaTeacher.work();
        uiTeacher.work();
        uiTeacher.draw();
    }
}

//员工类
abstract class Worker02 {
    private String name;
    private String sex;
    private Integer age;

    public Worker02() {
    }

    public Worker02(String name, String sex, Integer age) {
        this.name = name;
        this.sex = sex;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    abstract void work();
}

//绘画类接口
interface Draw {
    void draw();
}

//java讲师类
class JavaTeacher extends Worker02 {

    public JavaTeacher(String name, String sex, Integer age) {
        super(name, sex, age);
    }

    @Override
    void work() {
        System.out.println("我是Java讲师" + this.getName() + "，我在讲java课！");
    }
}

//UI讲师类
class UITeacher extends Worker02 implements Draw {

    public UITeacher(String name, String sex, Integer age) {
        super(name, sex, age);
    }

    @Override
    void work() {
        System.out.println("我是ui讲师" + this.getName() + ",我在将ui课");
    }

    @Override
    public void draw() {
        System.out.println("ui绘画");
    }
}